Skip to content

fix: Emit outer effects in array scope compilation#321

Merged
zharinov merged 1 commit intomasterfrom
fix/array-scope-outer-effects
Jan 10, 2026
Merged

fix: Emit outer effects in array scope compilation#321
zharinov merged 1 commit intomasterfrom
fix/array-scope-outer-effects

Conversation

@zharinov
Copy link
Member

Summary

  • Fix array scope compilation to emit outer pre-effects (like Enum) before Arr
  • Fix implicit array handling in compile_skippable_with_exits for structured types
  • Add emit_arr_step helper to accept pre-effects parameter

Why

When a labeled alternation variant has an array capture as its payload (e.g., [First: (E)* @arr]), the Enum effect was not emitted before Arr, causing a stack mismatch panic in the materializer. Similarly, uncaptured star quantifiers returning structured types needed implicit array scope handling.

@zharinov zharinov enabled auto-merge (squash) January 10, 2026 02:46
@zharinov zharinov merged commit 5c5d521 into master Jan 10, 2026
3 checks passed
@zharinov zharinov deleted the fix/array-scope-outer-effects branch January 10, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant